'use strict';
var rank_asc = function(collection){
  for(let i=0;i<collection.length-1;i++){
    for(let n=i+1;n<collection.length;n++){
      if(collection[n]>collection[i]){
        let temp=collection[i];
        collection[i]=collection[n];
        collection[n]=temp;      
      }
    }
  }
  let result=collection.map(function(k) {
    return k;
  });
  return result;
}

module.exports = rank_asc;
